import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import get from '@dfeidao/atom-web/local/get';

export default async function a004(fd: IFeidaoAiBrowserComponent) {
	// todo
	const len = get(fd, 'len');
	const n = fd.data.node.querySelector<HTMLImageElement>('[data-id="pic"]');
	let old = Number(n.getAttribute('flag'));
	if (old < len) {
		old++;
		n.setAttribute('flag', old + '');
		// const now = Number(n.getAttribute('flag'));
		// console.log(now + "当前flag");
	} else {
		alert("这是最后一张图片了");
	}




}
